package iqq.ui.view.rootpane;

import iqq.ui.view.panel.LoginPlFactory;

import java.awt.BorderLayout;
import java.awt.Color;

import com.alee.laf.panel.WebPanel;
import com.alee.laf.rootpane.WebRootPane;

/**
 * @author ChenZhiHui
 * @create-time 2013-3-8
 */
public class LoginRootPane extends WebRootPane {
	private static final long serialVersionUID = 7325060039323390803L;
	
	private WebPanel headerPl;
	private WebPanel centerPl;
	private WebPanel footerPl;
	
	public LoginRootPane() {
		initPanel();
		addPanel();
	}

	/**
	 * initialization panel
	 */
	private void initPanel() {
		headerPl = LoginPlFactory.getHeaderPl();
		centerPl = LoginPlFactory.getCenterPl();
		footerPl = LoginPlFactory.getFooterPl();
		
		headerPl.setBackground(new Color(200, 200, 200));
		centerPl.setBackground(new Color(244, 244, 244));
		footerPl.setBackground(new Color(244, 244, 244));
	}

	/**
	 * add panel to root pane
	 */
	private void addPanel() {
		setLayout(new BorderLayout());
		
		add(headerPl, BorderLayout.PAGE_START);
		add(centerPl, BorderLayout.CENTER);
		add(footerPl, BorderLayout.PAGE_END);
	}
}
